import js from "@eslint/js";
import globals from "globals";
import pluginVue from "eslint-plugin-vue";
import { defineConfig } from "eslint/config";

export default defineConfig([
  { files: ["**/*.{js,mjs,cjs,vue}"], plugins: { js }, extends: ["js/recommended"] },
  { files: ["**/*.{js,mjs,cjs,vue}"], languageOptions: { globals: globals.browser } },
  pluginVue.configs["flat/essential"],
  {
    files: ["**/*.js", "**/*.ts", "**/*.vue"],
    languageOptions: {
      globals: {
        chrome: "readonly",
        __dirname: "readonly",
      },
    },
    rules: {
      // 你的规则
    },
  },
]);
